<template>
  <div>
    <div class="tou" @click="fun()">&lt;</div>
    <div class="denglu">
      <span @click="fn('Denglu')">登录</span>
      <span @click="fn('Zhuce')">注册</span>
    </div>
    <keep-alive>
      <component :is="com"></component>
    </keep-alive>
  </div>
</template>

<script>
import Denglu from "@/components/zhuce/zhuces/denglu.vue";
import Zhuce from "@/components/zhuce/zhuces/zhuce.vue";
export default {
  methods: {
    fun() {
      this.$router.go("-1");
    },
    fn(data) {
      this.com = data;
    },
  },
  data() {
    return {
      com: "Denglu",
    };
  },

  components: {
    Denglu,
    Zhuce,
  },
};
</script>

<style scoped>
.tou {
  width: 0.2rem;
  font-size: 0.3rem;
  margin-left: 0.2rem;
}
.denglu {
  font-size: .35rem;
  font-weight: 600;
}
.denglu span{
  display: inline-block;
    width: 1.75rem;
    text-align: center;
    margin-top: 1rem;
}
</style>